package com.sam.scanner.adapter;


import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.sam.scanner.R;

import java.util.List;

public class InPackageRecordAdapter extends RecyclerView.Adapter<InPackageRecordAdapter.ViewHolder> {
    Context context;
    List<String> datas;

    public InPackageRecordAdapter(Context context, List<String> datas) {
        this.context = context;
        this.datas = datas;
    }

    @Override
    public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_in_package_record, parent, false);
        return new ViewHolder(v);
    }

    @Override
    public void onBindViewHolder(@NonNull ViewHolder holder, int position) {
//        holder.tv_ex_name.setText(datas.get(position));
    }

    @Override
    public int getItemCount() {
        return datas.size();
    }

    class ViewHolder extends RecyclerView.ViewHolder {
        TextView tv_ex_name;
        TextView tv_user_name;
        TextView tv_package_status;
        TextView tv_order_num;
        TextView tv_phone_num;
        TextView tv_goods_num;

        public ViewHolder(View itemView) {
            super(itemView);
            tv_ex_name = itemView.findViewById(R.id.tv_ex_name);
            tv_user_name = itemView.findViewById(R.id.tv_user_name);
            tv_package_status = itemView.findViewById(R.id.tv_package_status);
            tv_order_num = itemView.findViewById(R.id.tv_order_num);
            tv_phone_num = itemView.findViewById(R.id.tv_phone_num);
            tv_goods_num = itemView.findViewById(R.id.tv_goods_num);
        }
    }
}